#include <stdio.h>
#include <stdlib.h>
int main()
{
    FILE *fp = popen("ls -l", "r");
    char buf[1024];
    while (fgets(buf, sizeof(buf), fp)) {
        printf("%s", buf);
    }
    pclose(fp);
    return 0;
}